package com.hopu.service.Impl;

import com.hopu.mapper.AreaMapper;
import com.hopu.pojo.Area;
import com.hopu.service.AreaService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AreaServiceImpl implements AreaService {

    @Resource
    private AreaMapper areaMapper;
    @Override
    public List<Area> findAllAreaPageData() {
        return areaMapper.findAllAreaPageData();
    }

    @Override
    public int addArea(String aname) {
        return areaMapper.addArea(aname);
    }

    @Override
    public int uppArea(String aname, int aid) {
        return areaMapper.uppArea(aname,aid);
    }

    @Override
    public Area getAreaByName(String aname) {
        return areaMapper.getAreaByName(aname);
    }

    @Override
    public Area getAreaById(String aid) {
        return areaMapper.getAreaById(aid);
    }

    @Override
    public List<Area> findAllArea() {
        return areaMapper.findAllArea();
    }
}
